<?php
require './include.php';
$data = require './data.php';
$config = array(
		'app_id' => $data['app_id'],
		'app_secret' => $data['app_secret'],
);
$url = $_GET['url']?urldecode($_GET['url']):exit(500);
require_once  __DIR__ . "/wechat/jssdk.php";
@$jssdk = new JSSDK($config['app_id'], $config['app_secret']);
@$signPackage = $jssdk->GetSignPackage($url);
$num = mt_rand(20,60);
//share adUrl
$link = "http://{$data['d4']}/?xxid=1&xxsfile=".get_random_str(32).".html#_t=".time()*3;
$advlink = "http://{$data['d4']}/?xxid=1&xxsfile=".get_random_str(32).".html&path=http://www.baidu.com#_t=".time()*3;	
$jsondata = array(
         "code"=>0,
		"msg"=>"",
		"success"=>true,
		"friend"=>array(
				"title"=>null,
				"desc"=>"{$num}\"",
				"imgUrl"=>"http://".get_rand_str(2,6).".{$data['d2']}/static/images/audio.png",
				"link"=>$link,
				"advlink"=>$advlink,
				"advdesc2"=>randFace()."夫妻床上，射精'性'生活技巧,99%的男人不知道的技巧!",
				"advimgurl2"=>"https://0o0o0o0o.oss-cn-hongkong.aliyuncs.com/hvb/images/FvzOW-M7ggBsvCLmz6O-u9EMD74c.jpg",
				"advdesc4"=>randFace().'满足不了女-人？用这个方法，每次坚-挺40分钟！！',
				"advimgurl4"=>"https://0o0o0o0o.oss-cn-hongkong.aliyuncs.com/hvb/images/0060lm7Tly1fu3p28o39mj305405g746.jpg",
		),
		"timeline"=>array(
			"title"=> null,
			"desc"=>"{$num}\"",
			"imgUrl"=>"http://".get_rand_str(2,6).".{$data['d2']}/static/images/audio.png",
			"link"=>$link,
			"advlink"=>$advlink,
			"advdesc2"=>randFace().'满足不了女-人？用这个方法，每次坚-挺40分钟！！',
			"advimgurl2"=>"https://0o0o0o0o.oss-cn-hongkong.aliyuncs.com/hvb/images/0060lm7Tly1fu3p28o39mj305405g746.jpg",
		),
		"config"=>array(
			"debug"=> false,
			"appId"=>$signPackage['appId'],
			"signature"=>$signPackage['signature'],
			"timestamp"=>$signPackage['timestamp'],
			"nonceStr"=>$signPackage['nonceStr']
		),
);
exit(base64_encode(json_encode($jsondata)));
?>